package com.aegean.MonitorExamSYS.examinee.action;

import org.apache.struts2.ServletActionContext;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.aegean.MonitorExaxSYS.model.ExamineeValue;
import com.opensymphony.xwork2.ActionSupport;

@Controller("UserPositionJSON")
@Scope("prototype")
public class UserPositionJSON extends ActionSupport {
	private float position_V;
	private float position_H;
	private boolean success;

	public boolean isSuccess() {
		return success;
	}

	public void setSuccess(boolean success) {
		this.success = success;
	}

	public float getPosition_V() {
		return position_V;
	}

	public void setPosition_V(float position_V) {
		this.position_V = position_V;
	}

	public float getPosition_H() {
		return position_H;
	}

	public void setPosition_H(float position_H) {
		this.position_H = position_H;
	}

	@Override
	public String execute() throws Exception {
		// TODO Auto-generated method stub
		ExamineeValue user = (ExamineeValue) ServletActionContext.getRequest()
				.getSession().getAttribute("UserLogin");
		position_H = user.getExamineeValue_Address().getPlace_H();
		position_V = user.getExamineeValue_Address().getPlace_V();
		success = true;
		return SUCCESS;
	}

}
